package structuralPatterns.proxy;

public class Proxy implements Subject{

    Subject subject;

    public Proxy(Subject subject){
        this.subject = subject;
    }

    public void request(){
        doBeforeRequest();
        subject.request();
        doAfterRequest();
    }

    void doBeforeRequest(){
        System.out.println("Do something before request");
    }

    void doAfterRequest(){
        System.out.println("Do something after request");
    }


}
